﻿using Hotel.WCF.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Hotel.Models;

namespace Hotel.WCF.ImpServices
{
    public partial class GestionHotel:IHotel
    {
        private Clients _cli;
        public int AddClients(Clients cl)
        {
            int res = -1;
            try
            {
                _cli = new Clients();
                _cli = cl;
                _cli.Ajouter();
                res = 1;

            }
            catch (Exception ex)
            {
                res = -1;
                //logger les erreurs
                //throw ex;
            }

            return res;
        }

        public List<Clients> getListClients()
        {
            _cli = new Clients();
            return _cli.GetListeInstances();
        }
    }
}